<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function ()
{
    return view('welcome');
});

Route::group(['prefix' => 'goods'], function ()
{
    Route::get('/', 'GoodsController@index');
    Route::post('/store', 'GoodsController@store');
    Route::put('/{id}/update', 'GoodsController@update');
    Route::patch('/{id}/patch', 'GoodsController@patch');
    Route::delete('/{id}/destroy', 'GoodsController@destroy');
});

Route::group(['prefix' => 'orders'], function ()
{
//    Route::get('/', 'OrderController@index');
    Route::get('/spike', 'OrderController@spike');
    Route::get('/spike/run', 'OrderController@run');
//    Route::post('/store', 'OrderController@store');
//    Route::put('/{id}/update', 'OrderController@update');
//    Route::patch('/{id}/patch', 'OrderController@patch');
//    Route::delete('/{id}/destroy', 'OrderController@destroy');
});

Route::group(['prefix' => 'users'], function ()
{
    Route::get('/', 'UserController@index');
    Route::post('/store', 'UserController@store');
    Route::put('/{id}/update', 'UserController@update');
    Route::patch('/{id}/patch', 'UserController@patch');
    Route::delete('/{id}/destroy', 'UserController@destroy');
});
